package com.pk.flink.scenario01.app;

import com.pk.flink.scenario01.bean.NotFoundElement;
import com.pk.flink.scenario01.source.NotFoundElementSource;
import org.apache.flink.streaming.api.datastream.DataStreamSource;
import org.apache.flink.streaming.api.environment.StreamExecutionEnvironment;

public class NotFoundElementShowAllApp {
    public static void main(String[] args) throws Exception {
        //获取上下文环境
        StreamExecutionEnvironment env = StreamExecutionEnvironment.getExecutionEnvironment();

        DataStreamSource<NotFoundElement> ntfDataStreamSource = env.addSource(new NotFoundElementSource()).setParallelism(1);
        System.out.println(ntfDataStreamSource.getParallelism());
        ntfDataStreamSource.print();

        env.execute();
    }
}
